package com.ieheima.zixi;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class Demo04 {
    public static void main(String[] args) {
        Properties prop = new Properties();
        prop.put("张飞","25");
        prop.put("关羽","32");
        prop.put("刘备","35");
        /*Set<Object> keys = prop.keySet();
        for (Object key : keys) {
            Object value = prop.get(key);
            System.out.println(key + "--" + value);
        }*/
        Set<Map.Entry<Object, Object>> entries = prop.entrySet();
        for (Map.Entry<Object, Object> entry : entries) {
            Object key = entry.getKey();
            Object value = entry.getValue();
            System.out.println(key + "--" + value);
        }
    }
}
